﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="resultdetail.aspx.vb" Inherits="soccer.resultdetail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .auto-style1 {
            font-size: medium;
            margin-left: 40px;
        }
        .auto-style2 {
            font-size: large;
            margin-left: 40px;
        }
        .auto-style3 {
            font-size: medium;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SoccerDataSource">
            <Columns>
                <asp:BoundField DataField="fixtureID" HeaderText="Fixture No." InsertVisible="False" SortExpression="fixtureID" />
                <asp:BoundField DataField="season" HeaderText="Season" SortExpression="season" />
                <asp:BoundField DataField="divisionName" HeaderText="Division" SortExpression="divisionName" />
                <asp:BoundField DataField="fixtureDate" HeaderText="Fixture Date" SortExpression="fixtureDate" />
                <asp:BoundField DataField="HomeTeam" HeaderText="Home Team" SortExpression="HomeTeam" />
                <asp:BoundField DataField="homeTeamScore" HeaderText="HomeTeam Score" SortExpression="homeTeamScore" />
                <asp:BoundField DataField="AwayTeam" HeaderText="Away Team" SortExpression="AwayTeam" />
                <asp:BoundField DataField="awayTeamScore" HeaderText="AwayTeam Score" SortExpression="awayTeamScore" />
                <asp:BoundField DataField="venueName" HeaderText="Venue" SortExpression="venueName" />
                <asp:ImageField DataImageUrlField="FixturePhoto" HeaderText="Match Photo">
                </asp:ImageField>
                <asp:HyperLinkField DataNavigateUrlFields="fixtureId" DataNavigateUrlFormatString="teamRating.aspx?fixtureId={0}" Text="Rate" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SoccerDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:SoccerConnectionString %>" ProviderName="<%$ ConnectionStrings:SoccerConnectionString.ProviderName %>" SelectCommand="SELECT Fixture.fixtureID, Fixture.season, Fixture.homeTeamScore, Fixture.awayTeamScore, Fixture.fixtureDate, Fixture.fixturePhoto, Fixture.venueId, Division.divisionName, Team_1.teamName AS HomeTeam, Team.teamName AS AwayTeam, Venue.venueName FROM ((((Fixture INNER JOIN Division ON Fixture.divisionId = Division.DivisionId) INNER JOIN Team ON Fixture.awayTeamId = Team.teamID AND Division.DivisionId = Team.divisionId) INNER JOIN Team Team_1 ON Fixture.hometeamId = Team_1.teamID AND Division.DivisionId = Team_1.divisionId) LEFT OUTER JOIN Venue ON Fixture.venueId = Venue.venueID) WHERE (Fixture.fixtureID = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="fixtureID" QueryStringField="fixtureId" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" DataSourceID="FixtureTagDataSource">
            <Columns>
                <asp:BoundField DataField="tag" HeaderText="Categories (tags) for this fixture" SortExpression="tag" />
            </Columns>
        </asp:GridView>
    </p>
    <p class="auto-style3">
        <asp:SqlDataSource ID="FixtureTagDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:SoccerConnectionString %>" ProviderName="<%$ ConnectionStrings:SoccerConnectionString.ProviderName %>" SelectCommand="SELECT DISTINCT [tag] FROM [q_FixtureTagLink] WHERE ([fixtureId] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="fixtureId" QueryStringField="fixtureId" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p class="auto-style3">
        Comments on this fixture</p>
    <p>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" >
            <Columns>
                <asp:BoundField DataField="commentSubject" HeaderText="Subject" SortExpression="commentSubject" />
                <asp:BoundField DataField="commentText" HeaderText="Comments" SortExpression="commentText" />
                <asp:BoundField DataField="author" HeaderText="Author" SortExpression="author" />
                <asp:BoundField DataField="commentDate" HeaderText="Date" SortExpression="commentDate" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="CommentDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:SoccerConnectionString %>" ProviderName="<%$ ConnectionStrings:SoccerConnectionString.ProviderName %>" SelectCommand="SELECT [commentSubject], [commentText], [author], [commentDate], [commentPhoto] FROM [Comments] WHERE ([fixtureId] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="fixtureId" QueryStringField="fixtureId" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p class="auto-style2">
        Add your comments on this fixture !</p>
    <p class="auto-style1">
        Subject:&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="tb_CommentSubject" runat="server" Width="299px"></asp:TextBox>
    </p>
    <p class="auto-style1">
        Comments</p>
    <p class="auto-style1">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:TextBox ID="tb_commentText" runat="server" Height="171px" TextMode="MultiLine" Width="477px"></asp:TextBox>
    </p>
    <p class="auto-style1">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="btn_AddComment" runat="server" Text="Submit this comment" />
    </p>
    <p class="auto-style1">
        Categorize (tag) this fixture</p>
    <p class="auto-style1">
        <asp:CheckBoxList ID="cb_Tags" runat="server" DataSourceID="TagDataSource" DataTextField="tag" DataValueField="tagId" RepeatDirection="Horizontal" Font-Size="Small">
        </asp:CheckBoxList>
        <asp:SqlDataSource ID="TagDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:SoccerConnectionString %>" ProviderName="<%$ ConnectionStrings:SoccerConnectionString.ProviderName %>" SelectCommand="SELECT * FROM [FixtureTags]"></asp:SqlDataSource>
        Add new comma separated tags here&nbsp;
        <asp:TextBox ID="tb_NewTag" runat="server" Width="331px"></asp:TextBox>
        <br />
        <asp:Button ID="bn_TagFixture" runat="server" Text="Tag fixture" />
        <br />
    </p>
</asp:Content>
